﻿using UnityEngine;
using UnityEngine.EventSystems;

namespace Jinndev {

    public class PointerMoveHelper : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler {

        public delegate void OnPointerEnterAction(PointerEventData eventData);
        public OnPointerEnterAction onPointerEnter;

        public delegate void OnPointerExitAction(PointerEventData eventData);
        public OnPointerExitAction onPointerExit;

        public void OnPointerEnter(PointerEventData eventData) {
            if(onPointerEnter != null) {
                onPointerEnter.Invoke(eventData);
            }
        }

        public void OnPointerExit(PointerEventData eventData) {
            if (onPointerExit != null) {
                onPointerExit.Invoke(eventData);
            }
        }

    }

}
